//
//  ZYHCommonMethod.h
//  YiYueStore
//
//  Created by zhouzhouzhou on 2018/10/16.
//  Copyright © 2018年 YuYiLian. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef void (^STAlertBlock)(BOOL succeeded, NSError *error);

@interface ZYHCommonMethod : NSObject

///返回当前视图的控制器
+ (UIViewController *)getCurrentRootViewController:(UIView*)view ;


//展示错误信息
+ (void)showErrorAlertView:(NSString*)errorStr ;
+ (void)showError:(NSError*)error ;
+ (void)showSuccess:(NSString*)error ;

//展示取消 确定信息
+(void)showAlertActionViewWithShowVC:(UIViewController *)vc showMsg:(NSString *)msg sureBtnBack:(STAlertBlock)complection;

//存取自定义数据 目前固定在library目录下
+(BOOL)saveAutoModelToSandBox:(id)model withPath:(NSString *)path;
+(id)getAutoModelToSandBoxWithClassName:(NSString *)className withPath:(NSString *)path;
@end
